import React, { useEffect, useState } from 'react'
import { useLocation, useParams } from 'react-router-dom'
import { useSelector, useDispatch } from 'react-redux'
import { ALLTYPELIST } from '../../types/store.d'
import { ProductCard, Tag, Button } from 'react-vant';

export default function Topour() {

    const carList = useSelector((state: ALLTYPELIST) => {
        return state.xiangq

    })
    console.log(carList);

    useEffect(() => {
        console.log(carList, 'carlist');

    }, [carList])

    // 怎么了 瞎整啊 好吧 你前面给数据都传到详情了，传iteme就像  你做了啥渲染出来了 插件还没有出来 map可以出来  你做了啥操作map粗来了
    return (
        <div>
            {
                carList.map((item, index) => {
                    return <div key={index}>{item.user}1111111111
                        <p>{item.id}</p>
                        <ProductCard
                            num='1'
                            price={item.num}
                            desc={item.user}
                            title={item.title}
                            thumb={item.img}
                        />
                    </div>
                })


            }


        </div>
    )
}
